/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * UserPreference.java
 *
 * Created on Feb 24, 2012, 4:18:05 PM
 */

package UserInterface;

import AI.UserPreference;

/**
 *
 * @author Harsha
 */
public class UserPreferenceList extends javax.swing.JFrame {
    private UserPreference preference;
    /** Creates new form UserPreference */
    public UserPreferenceList(UserPreference preference) {
        this.preference=preference;
        initComponents();
        setLocationRelativeTo(this);
        setVisible(true);
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        bOnJourney = new javax.swing.JCheckBox();
        bMealPlace = new javax.swing.JCheckBox();
        dYes = new javax.swing.JCheckBox();
        dNo = new javax.swing.JCheckBox();
        eOnJourney = new javax.swing.JCheckBox();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        eAtPlace = new javax.swing.JCheckBox();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        bTime = new javax.swing.JComboBox();
        lTime = new javax.swing.JComboBox();
        eTime = new javax.swing.JComboBox();
        dTime = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        lunchOk = new javax.swing.JCheckBox();
        LunchNo = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        journeyDays = new javax.swing.JComboBox();
        StartTime = new javax.swing.JComboBox();
        ArrivalTime = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jButton1.setText("Next");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Meal Preferences"));

        jLabel7.setText("Evening Tea");

        jLabel8.setText("Dinner");

        bOnJourney.setText("On the journey");
        bOnJourney.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bOnJourneyActionPerformed(evt);
            }
        });

        bMealPlace.setText("At a meal place");
        bMealPlace.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bMealPlaceActionPerformed(evt);
            }
        });

        dYes.setText("Yes");
        dYes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dYesActionPerformed(evt);
            }
        });

        dNo.setText("No");
        dNo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dNoActionPerformed(evt);
            }
        });

        eOnJourney.setText("On the journey");
        eOnJourney.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                eOnJourneyActionPerformed(evt);
            }
        });

        jLabel9.setText("Lunch");

        jLabel10.setText("Breakfast");

        eAtPlace.setText("At a meal place");
        eAtPlace.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                eAtPlaceActionPerformed(evt);
            }
        });

        jLabel4.setText("@");

        jLabel5.setText("@");

        jLabel6.setText("@");

        jLabel11.setText("@");

        bTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "8", "9", "10", "11" }));

        lTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "12", "1", "2", "3" }));

        eTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "3", "4", "5" }));

        dTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "7", "8", "9", "10" }));

        jLabel14.setText("AM");

        jLabel15.setText("PM");

        jLabel16.setText("PM");

        jLabel17.setText("PM");

        lunchOk.setText("On the journey");
        lunchOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lunchOkActionPerformed(evt);
            }
        });

        LunchNo.setText("At a meal place");
        LunchNo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LunchNoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(104, 104, 104)
                .addComponent(lunchOk, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(LunchNo)
                    .addComponent(dNo)
                    .addComponent(eAtPlace)
                    .addComponent(bMealPlace, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(72, 72, 72)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(jLabel11)
                    .addComponent(jLabel4))
                .addGap(45, 45, 45)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(bTime, 0, 80, Short.MAX_VALUE)
                    .addComponent(lTime, 0, 80, Short.MAX_VALUE)
                    .addComponent(eTime, javax.swing.GroupLayout.Alignment.TRAILING, 0, 80, Short.MAX_VALUE)
                    .addComponent(dTime, javax.swing.GroupLayout.Alignment.TRAILING, 0, 80, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel16)
                        .addComponent(jLabel15))
                    .addComponent(jLabel14)
                    .addComponent(jLabel17)))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(17, 17, 17)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel9)
                        .addComponent(jLabel10)
                        .addComponent(jLabel7)
                        .addComponent(jLabel8))
                    .addGap(25, 25, 25)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(bOnJourney)
                        .addComponent(dYes)
                        .addComponent(eOnJourney))
                    .addContainerGap(387, Short.MAX_VALUE)))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(bTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel15))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(dTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel17)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(bMealPlace))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel5)
                                    .addComponent(lunchOk)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(LunchNo)))
                        .addGap(7, 7, 7)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(eAtPlace)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(dNo)
                            .addComponent(jLabel11))))
                .addContainerGap(85, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(27, 27, 27)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel10)
                        .addComponent(bOnJourney))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jLabel9)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel7)
                        .addComponent(eOnJourney))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel8)
                        .addComponent(dYes))
                    .addContainerGap(91, Short.MAX_VALUE)))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Journey Details"));

        jLabel3.setText("Journey Days");

        jLabel1.setText("Start Time");

        journeyDays.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));

        StartTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "4", "5", "6", "7", "8", "9", "10", "11" }));

        ArrivalTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" }));

        jLabel2.setText("Arriva Timel");

        jLabel12.setText("AM");

        jLabel13.setText("PM");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(59, 59, 59)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(ArrivalTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel13))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(StartTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jLabel12))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                            .addComponent(journeyDays, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(166, 166, 166))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(journeyDays, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(StartTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ArrivalTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel2))
                    .addComponent(jLabel13))
                .addContainerGap(104, Short.MAX_VALUE))
        );

        jButton2.setText("Back");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(37, 37, 37)
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addGap(28, 28, 28))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        preference.setNoOfDays(Integer.parseInt(journeyDays.getSelectedItem().toString()));
        preference.setStartTime(Double.parseDouble(StartTime.getSelectedItem().toString()));
        preference.setArrivalTime(Double.parseDouble(ArrivalTime.getSelectedItem().toString())+12);
        preference.setBreakFirstTime(Double.parseDouble(bTime.getSelectedItem().toString()));
        if(!lTime.getSelectedItem().toString().equalsIgnoreCase("12"))
        {
         preference.setLunchTime(Double.parseDouble(lTime.getSelectedItem().toString())+12);
        }
        else
        {
            preference.setLunchTime(Double.parseDouble(lTime.getSelectedItem().toString()));
        }
          preference.setEveningMealTime(Double.parseDouble(eTime.getSelectedItem().toString())+12);
           preference.setDinnerTime(Double.parseDouble(dTime.getSelectedItem().toString())+12);
           if(bOnJourney.isSelected())
           {
               preference.setBreakFast(false);
           }
            else
           {
               preference.setBreakFast(true);
           }
            if(eOnJourney.isSelected())
           {
               preference.setEveningMeal(false);
           }
            else
           {
               preference.setEveningMeal(true);
           }
            if(dYes.isSelected())
           {
               preference.setDinner(true);
           }
            else
           {
               preference.setDinner(false);
           }
           if(lunchOk.isSelected())
           {
               preference.setLunch(true);
           }
            else
           {
               preference.setLunch(false);
            }
           UserPreferenceShow show=new UserPreferenceShow(preference);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void bOnJourneyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bOnJourneyActionPerformed
        if(bMealPlace.isSelected())
        {
            bMealPlace.setSelected(false);
        }
    }//GEN-LAST:event_bOnJourneyActionPerformed

    private void bMealPlaceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bMealPlaceActionPerformed
         if(bOnJourney.isSelected())
        {
           bOnJourney.setSelected(false);
        }
    }//GEN-LAST:event_bMealPlaceActionPerformed

    private void eOnJourneyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_eOnJourneyActionPerformed
        if(eAtPlace.isSelected())
        {
            eAtPlace.setSelected(false);
        }
    }//GEN-LAST:event_eOnJourneyActionPerformed

    private void eAtPlaceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_eAtPlaceActionPerformed
         if(eOnJourney.isSelected())
        {
            eOnJourney.setSelected(false);
        }
    }//GEN-LAST:event_eAtPlaceActionPerformed

    private void dYesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dYesActionPerformed
        if(dNo.isSelected())
        {
            dNo.setSelected(false);
        }
    }//GEN-LAST:event_dYesActionPerformed

    private void dNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dNoActionPerformed
        if(dYes.isSelected())
        {
            dYes.setSelected(false);
        }
    }//GEN-LAST:event_dNoActionPerformed

    private void lunchOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lunchOkActionPerformed
        if(LunchNo.isSelected())
        {
            LunchNo.setSelected(false);
        }
    }//GEN-LAST:event_lunchOkActionPerformed

    private void LunchNoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LunchNoActionPerformed
         if(lunchOk.isSelected())
        {
            lunchOk.setSelected(false);
        }
    }//GEN-LAST:event_LunchNoActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new UserPreferenceList(null).setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox ArrivalTime;
    private javax.swing.JCheckBox LunchNo;
    private javax.swing.JComboBox StartTime;
    private javax.swing.JCheckBox bMealPlace;
    private javax.swing.JCheckBox bOnJourney;
    private javax.swing.JComboBox bTime;
    private javax.swing.JCheckBox dNo;
    private javax.swing.JComboBox dTime;
    private javax.swing.JCheckBox dYes;
    private javax.swing.JCheckBox eAtPlace;
    private javax.swing.JCheckBox eOnJourney;
    private javax.swing.JComboBox eTime;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JComboBox journeyDays;
    private javax.swing.JComboBox lTime;
    private javax.swing.JCheckBox lunchOk;
    // End of variables declaration//GEN-END:variables

}
